package com.tj.bo.payment.server.services;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * 支付配置
 *
 * @author ZhangChao
 * @since 2021/7/19
 */
@Component
public class PaymentConfig {
    @NacosValue(value = "${payment.merchant.id:}", autoRefreshed = true)
    private String merchantId;
    @NacosValue(value = "${payment.api.gateway:}", autoRefreshed = true)
    private String gateway;
    @NacosValue(value = "${payment.api.pay.order.create:}", autoRefreshed = true)
    private String payOrderCreate;
    @NacosValue(value = "${payment.api.pay.order.query:}", autoRefreshed = true)
    private String payOrderQuery;
    @NacosValue(value = "${payment.api.dfpay.order.create:}", autoRefreshed = true)
    private String dfPayOrderCreate;
    @NacosValue(value = "${payment.api.dfpay.order.query:}", autoRefreshed = true)
    private String dfPayOrderQuery;
    @NacosValue(value = "${payment.notify.url:}", autoRefreshed = true)
    private String notifyUrl;
    @NacosValue(value = "${payment.callback.url:}", autoRefreshed = true)
    private String callbackUrl;
    @NacosValue(value = "${payment.api.key:}", autoRefreshed = true)
    private String apiKey;
    @NacosValue(value = "${payment.channel.name:}", autoRefreshed = true)
    private String channelName;

    public Integer getChannelCode() {
        return channelCode;
    }

    public void setChannelCode(Integer channelCode) {
        this.channelCode = channelCode;
    }

    @NacosValue(value = "${payment.channel.code:}", autoRefreshed = true)
    private Integer channelCode;
    @NacosValue(value = "${payment.channel.fee.rate:}", autoRefreshed = true)
    private BigDecimal serviceFeeRate;

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getGateway() {
        return gateway;
    }

    public void setGateway(String gateway) {
        this.gateway = gateway;
    }

    public String getPayOrderCreate() {
        return payOrderCreate;
    }

    public void setPayOrderCreate(String payOrderCreate) {
        this.payOrderCreate = payOrderCreate;
    }

    public String getPayOrderQuery() {
        return payOrderQuery;
    }

    public void setPayOrderQuery(String payOrderQuery) {
        this.payOrderQuery = payOrderQuery;
    }

    public String getDfPayOrderCreate() {
        return dfPayOrderCreate;
    }

    public void setDfPayOrderCreate(String dfPayOrderCreate) {
        this.dfPayOrderCreate = dfPayOrderCreate;
    }

    public String getDfPayOrderQuery() {
        return dfPayOrderQuery;
    }

    public void setDfPayOrderQuery(String dfPayOrderQuery) {
        this.dfPayOrderQuery = dfPayOrderQuery;
    }

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    public String getCallbackUrl() {
        return callbackUrl;
    }

    public void setCallbackUrl(String callbackUrl) {
        this.callbackUrl = callbackUrl;
    }

    public String getApiKey() {
        return apiKey;
    }

    public void setApiKey(String apiKey) {
        this.apiKey = apiKey;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }



    public BigDecimal getServiceFeeRate() {
        return serviceFeeRate;
    }

    public void setServiceFeeRate(BigDecimal serviceFeeRate) {
        this.serviceFeeRate = serviceFeeRate;
    }
}
